<%@ Page Title="" Language="C#" MasterPageFile="~/Maintainance/Maintainance.master" AutoEventWireup="true" CodeBehind="Activities.aspx.cs" Inherits="OpenPhotoAlbum.Maintainance.Activities" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ph1" runat="server">
<asp:UpdatePanel ID="up1" runat="server"><ContentTemplate>
	<div>
		<asp:TextBox ID="tbKeyword" runat="server" Font-Size="0.8em" />
		<asp:Button ID="btnSearchIp" runat="server" Text="Search IP" Font-Size="0.8em" 
			onclick="btnSearchIp_Click" />
		|
		<asp:Button ID="btnShowAll" runat="server" Text="Show All" Font-Size="0.8em" 
			onclick="btnShowAll_Click" />
	</div>
	<asp:GridView ID="gridView" runat="server" AllowPaging="True" 
	AllowSorting="True" AutoGenerateColumns="False"
	Font-Size="0.9em" PageSize="25" PagerSettings-Position="TopAndBottom" 
		DataSourceID="LinqDataSourceAll" >
	<PagerSettings Position="TopAndBottom"></PagerSettings>
	<Columns>
		<asp:BoundField DataField="IpAddress" HeaderText="IpAddress" 
			SortExpression="IpAddress" />
		<asp:BoundField DataField="ActionType" HeaderText="ActionType" 
			SortExpression="ActionType" />
		<asp:BoundField DataField="ActionData1" HeaderText="ActionData1" 
			SortExpression="ActionData1" />
		<asp:BoundField DataField="ActionData2" HeaderText="ActionData2" 
			SortExpression="ActionData2" />
		<asp:BoundField DataField="ActionData3" HeaderText="ActionData3" 
			SortExpression="ActionData3" />
		<asp:BoundField DataField="ActionTime" HeaderText="ActionTime" 
			SortExpression="ActionTime" />
	</Columns>
</asp:GridView>
<asp:LinqDataSource ID="LinqDataSourceAll" runat="server" 
	ContextTypeName="OpenPhotoAlbum.DbAccess.DataClassesUADataContext" 
	OrderBy="ActionTime desc" TableName="Actions">
</asp:LinqDataSource>
<asp:LinqDataSource ID="LinqDataSourceIp" runat="server" 
	ContextTypeName="OpenPhotoAlbum.DbAccess.DataClassesUADataContext" 
	OrderBy="ActionTime desc" TableName="Actions" Where="IpAddress == @IpAddress">
	<WhereParameters>
		<asp:ControlParameter ControlID="tbKeyword" Name="IpAddress" 
			PropertyName="Text" Type="String" />
	</WhereParameters>
</asp:LinqDataSource>
</ContentTemplate></asp:UpdatePanel>
</asp:Content>
